package com.bcxj.apipassenger.controller;

import com.bcxj.apipassenger.Service.ForecastPriceService;
import com.bcxj.internalcommon.dto.ForecastPriceDTO;
import com.bcxj.internalcommon.dto.ResponseResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * ClassName: ForecastPriceController
 * Package: com.bcxj.apipassenger.controller
 * Description:
 *
 * @Author BCXJ
 * @Create 2024/10/5 14:12
 * @Version 1.0
 * @Since 1.0
 */
@RestController
public class ForecastPriceController {

    @Autowired
    private ForecastPriceService forecastPriceService;

    @PostMapping("/forecast-price")
    public ResponseResult forecastPrice(@RequestBody ForecastPriceDTO forecastPriceDTO) {
        return forecastPriceService.getForecastPrice(forecastPriceDTO.getDepLongitude(), forecastPriceDTO.getDepLatitude(),
                forecastPriceDTO.getDestLongitude(), forecastPriceDTO.getDestLatitude()
        , forecastPriceDTO.getCityCode(), forecastPriceDTO.getVehicleType());
    }

}
